package com.xx.xunyou.dao.item.chizhuzaixiang;

import com.xx.xunyou.entity.item.chizhuzaixiang.Chizhuzaixiang;
import com.xx.xunyou.entity.item.chizhuzaixiang.vo.ChizhuzaixiangVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface ChizhuzaixiangDAO {
    int deleteByPrimaryKey(Integer chizhuzaixiangId);

    int insert(Chizhuzaixiang record);

    int insertSelective(Chizhuzaixiang record);

    Chizhuzaixiang selectByPrimaryKey(Integer chizhuzaixiangId);

    int updateByPrimaryKeySelective(Chizhuzaixiang record);

    int updateByPrimaryKey(Chizhuzaixiang record);

    /**
     * 查询数据条数
     * @param map
     * @return
     */
    Integer queryListCountToManager(Map<String,Object> map);

    /**
     * 查询数据
     * @param map
     * @return
     */
    List<Map> queryListToManager(Map<String,Object> map);

    /**
     * 添加主键返回
     * @param chizhuzaixiang
     */
    void insertBackId(Chizhuzaixiang chizhuzaixiang);

    /**
     * 推荐
     * @param chizhuzaixiangId
     * @param date
     */
    void recommend(@Param("chizhuzaixiangId") Integer chizhuzaixiangId, @Param("date") Date date);

    /**
     * 取消推荐
     * @param chizhuzaixiangId
     */
    void notRecommend(@Param("chizhuzaixiangId")Integer chizhuzaixiangId);

    /**
     * 查询返回给app
     * @param map
     * @return
     */
    List<ChizhuzaixiangVo> queryListToAPPIndex(Map<String,Object> map);

    /**
     * 查询推荐
     * @param map
     * @return
     */
    List<Chizhuzaixiang> querByMapToAPPPageRecommend(Map<String,Object> map);

    /**
     * 查询数据
     * @param map
     * @return
     */
    List<Chizhuzaixiang> querByMapToAPPPage(Map<String,Object> map);

    /**
     * 查询总条数
     * @param map
     * @return
     */
    Integer querByMapToAPPTotal(Map<String,Object> map);
}